﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using LsUpdater.API;
using System.Threading;

namespace LsUpdater
{
    public partial class UpdaterFrm : Form
    {
        public UpdaterFrm()
        {
            InitializeComponent();
        }
        private void btnReadyUpdate_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProcessFrm processFrm = new ProcessFrm();
            processFrm.ShowDialog();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Environment.Exit(0);
        }
        Thread thread = null;
        private void UpdaterFrm_Load(object sender, EventArgs e)
        {
            ReadConfig();       
        }

        private void ReadConfig()
        {
            lblAppName.Text = string.Format(lblAppName.Text,Comm.infoRemote.appname);
            lblUpdateVersion.Text = string.Format(lblUpdateVersion.Text, Comm.infoRemote.version);
            txtInfo.Text = Comm.infoRemote.desc;
            //lblSize.Text = UpdateHelper.Instance.FileSize;
            thread = null;
        }
    }
}
